﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserMessageControl.ascx.cs" Inherits="MusicmanWeb.Custom.UserMessageControl" %>
<%@ register tagprefix="umc" 
    tagname="MessageControlTemplate" 
    src="~/Custom/MessageTemplateControl.ascx" %>
<div id="messagebox" class="message-box">
 <div id="mainmessage" class="main-message">
    <div id="actionbuttons" class="action-box">
        <asp:ImageButton id="deleteButton" runat="server" 
                ImageUrl="../Images/message_delete.png"
                CssClass="action-img" 
                CommandName="Delete"
                OnCommand="Delete_Command"
                OnClientClick="return confirm('Are you sure you watn to delete message?');"/>
    </div>
    <div id="title" class="message-title">
        <label id="msgsender" runat="server" style="float:left"></label> <label id="msgtime" runat="server" style="float:right">[10-10-2009 22:10]</label>
    </div>
    <div id="msgcnt" runat="server" class="message-content">
    </div>
    <asp:Repeater ID="commentsrepeater" 
                runat="server" 
                OnItemDataBound="Commentsrepeater_ItemDataBound"
                OnItemCommand="commentsrepeater_ItemCommand">
    <HeaderTemplate>
        <div id="commens" class="comment-box">
    </HeaderTemplate>
    <ItemTemplate>
      <umc:MessageControlTemplate ID="commentcontrol" runat="server" />
    </ItemTemplate>
    <FooterTemplate>
        </div>
    </FooterTemplate>
    </asp:Repeater>
<%--     <div id="commens" class="comment-box">
         <asp:PlaceHolder ID="commentsPnl" runat="server" EnableViewState="true"></asp:PlaceHolder>
     </div>
--%>
        <div class="comment-box">
        <asp:LinkButton runat="server" 
                        ID="Expandlink" 
                        CommandName="Expand" 
                        Text="Show all messages"
                        OnCommand="Expandlink_Command" />    
    </div>  
    <div class="comment-box" >
      <textarea id="commenttxt" runat="server" cols="30" rows="1" 
                    style="color:#999"
                    onclick="ExpandColapse(this, true);"
                    onblur="ExpandColapse(this, false);">write a comment...</textarea>
      <asp:LinkButton ID="CommentBtn" runat="server" OnCommand="Comment_Command" CommandName="AddComment">Comment</asp:LinkButton>
    </div>    
 </div>
 <div id="imagebox" class="image-box">
    <img id="profileImg" runat="server" class="profilepic" src="" />
 </div>
</div>